
/**
 * 作者:TC
 * 时间:2023/12/14 11:04
 * 描述:没有bug
 */

package Student;
import java.util.ArrayList;
import java.util.Collections;
public class MyStudentTest  {
    public static void main(String[] args) {
        MyStudent s1=new MyStudent(4,"小钟");
        MyStudent s2=new MyStudent(1,"小洁");
        MyStudent s3=new MyStudent(2,"小谭");
        MyStudent s4=new MyStudent(3,"小灿");
        ArrayList<MyStudent> stu=new ArrayList<MyStudent>();
        stu.add(s1);
        stu.add(s2);
        stu.add(s3);
        stu.add(s4);
        //讲Stu收集起来
        Collections.sort(stu);
        System.out.println(stu.toString());
    }
}
